import { createRouter, createWebHistory } from 'vue-router'
import Home from '@/views/home/index.vue'
import TabBar from '@/components/TebBar.vue'

const routes = [{
        path: '/home',
        name: 'home',
        components: {
            default: Home,
            footer: TabBar
        }
    },
    {
        path: '/',
        name: 'mai',
        components: {
            default: () =>
                import ('../views/mai/index.vue'),
            footer: TabBar
        }
    },
    {
        path: '/tansou',
        name: 'tansou',
        components: {
            default: () =>
                import ('../views/tansou/index.vue'),
            footer: TabBar
        }
    },
    {
        path: '/user',
        name: 'user',
        components: {
            default: () =>
                import ('../views/user/index.vue'),
            footer: TabBar
        }
    },
    {
        path: '/search',
        name: 'search',
        component: () =>
            import ('../views/search/index.vue')
    }
]

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
})


export default router